﻿/* Tipos de Objetos*/
/*********  ***********/
function Componente() {
    this.IdComponente = 0;
    this.Nombre = "";
    this.Codigo = "";
    this.NombreCorto = "";
    this.P01Unidad = 0;
    this.P01UnidadDesc = "";
    this.Descripcion = "";
    this.P07Clase = 0;
    this.P07ClaseDesc = "";
    this.TiempoVidaAnio = 0;
    this.Capacidad = "";
    this.InfoPublica = 0;
}

function ComponentePrecio() {
    this.IdCompPrecio = 0;
    this.IdComponente = 0;
    this.PrecioUnitario = 0;
    this.P02Fuente = 0;
    this.NombreFuente = "";
    this.UsuCre = "";
    this.IpReg = "";
}
function Grupo() {
    this.IdGrupo = 0;
    this.Nombre = "";
    this.Descripcion = "";
    this.Codigo = "";
    this.P05Tipo = 0;
    this.p05TipoDesc = "";
    this.p06Subtipo = 0;
    this.p06SubtipoDesc = "";
    this.UsuCre = "";
    this.IpReg = "";
}

function GrupoDetalle() {
    this.IdGrupoDetalle = 0;
    this.IdComponente = 0;
    this.IdGrupo = 0;
    this.Cantidad = 0;
    this.PrecioTotalMaximo = 0;
    this.PrecioTotalMinimo = 0;
    this.UsuCre = "";
    this.IpReg = "";
    this.P07Clase = 0;
}
function ProyectoGrupo() {
    this.P04Titulo = 0;
    this.P04TituloDesc = 0;
    this.IdGrupo = 0;
    this.IdProyecto = 0;
    this.UsuCre = "";
    this.IpReg = "";
}


var elementos = {
    item1: [{
        id: 100,
        value: "Nodo de Transporte"
    }, {
        id: 101,
        value: "Instalación"
    }, {
        id: 103,
        value: "Obras Civiles"
    }, {
        id: 104,
        value: "Seguridad"
    }, {
        id: 105,
        value: "Energía"
    }],
    item2: [{
        id: 200,
        value: "Fibra ADSS"
    }, {
        id: 201,
        value: "Fibra Óptica Canalizada"
    }, {
        id: 202,
        value: "Fibra Enterrada"
    }, {
        id: 203,
        value: "Ferretería"
    }, {
        id: 204,
        value: "Nodo de Transporte"
    }, {
        id: 205,
        value: "Instalación"
    }, {
        id: 206,
        value: "Obras Civiles"
    }, {
        id: 207,
        value: "Seguridad"
    }, {
        id: 208,
        value: "Energía"
    }],
    item3: [{
        id: 300,
        value: "Estación Radioeléctrica"
    }, {
        id: 301,
        value: "Equipamiento Adicional"
    }, {
        id: 303,
        value: "Instalación"
    }, {
        id: 304,
        value: "Obras Civiles"
    }, {
        id: 305,
        value: "Seguridad"
    }, {
        id: 306,
        value: "Energía"
    }],
    item4: [{
        id: 400,
        value: "Fibra ADSS"
    }, {
        id: 401,
        value: "Fibra Óptica Canalizada"
    }, {
        id: 402,
        value: "Fibra Enterrada"
    }, {
        id: 403,
        value: "Ferretería"
    }, {
        id: 404,
        value: "Nodo de Transporte"
    }, {
        id: 405,
        value: "Instalación"
    }, {
        id: 406,
        value: "Obras Civiles"
    }, {
        id: 407,
        value: "Seguridad"
    }, {
        id: 408,
        value: "Energía"
    }],
    item5: [{
        id: 500,
        value: "Estación Base"
    }, {
        id: 501,
        value: "Abonados"
    }, {
        id: 503,
        value: "Instalación"
    }, {
        id: 504,
        value: "Obras Civiles"
    }, {
        id: 505,
        value: "Seguridad"
    }, {
        id: 506,
        value: "Energía"
    }],
    item6: [{
        id: 600,
        value: "Fibra Óptica Aérea"
    }, {
        id: 601,
        value: "Fibra Óptica Enterrada"
    }, {
        id: 601,
        value: "Ferretería de Fibra Óptica"
    }, {
        id: 601,
        value: "Splitters y cajas terminales"
    }, {
        id: 601,
        value: "Bandeja"
    }, {
        id: 601,
        value: "Abonados"
    }, {
        id: 603,
        value: "Instalación"
    }, {
        id: 604,
        value: "Obras Civiles"
    }, {
        id: 605,
        value: "Seguridad"
    }, {
        id: 606,
        value: "Energía"
    }],
    item7: [{
        id: 600,
        value: "Par de Cobre"
    }, {
        id: 601,
        value: "Cable Coaxial"
    }, {
        id: 601,
        value: "Splitters y cajas terminales"
    }, {
        id: 601,
        value: "Ferretería de Cobre"
    }, {
        id: 601,
        value: "Abonados"
    }, {
        id: 601,
        value: "Equipamiento Adicional"
    }, {
        id: 603,
        value: "Instalación"
    }, {
        id: 604,
        value: "Obras Civiles"
    }, {
        id: 605,
        value: "Seguridad"
    }, {
        id: 606,
        value: "Energía"
    }],
    item8: [{
        id: 500,
        value: "Equipamiento Activo"
    }, {
        id: 501,
        value: "Equipamiento Adicional"
    }, {
        id: 503,
        value: "Instalación"
    }, {
        id: 504,
        value: "Obras Civiles"
    }, {
        id: 505,
        value: "Seguridad"
    }, {
        id: 506,
        value: "Energía"
    }],
    item9: [{
        id: 500,
        value: "Equipamiento Activo"
    }, {
        id: 501,
        value: "Equipamiento Adicional"
    }, {
        id: 503,
        value: "Instalación"
    }, {
        id: 504,
        value: "Obras Civiles"
    }, {
        id: 505,
        value: "Seguridad"
    }, {
        id: 506,
        value: "Energía"
    }],
    item10: [{
        id: 500,
        value: "Porcentaje de Contingencia"
    }, {
        id: 501,
        value: "Seguros"
    }, {
        id: 503,
        value: "Licencias"
    }, {
        id: 503,
        value: "Permisos"
    }, {
        id: 503,
        value: "CIRA"
    }, {
        id: 503,
        value: "Estudios de Ingeniería"
    }, {
        id: 504,
        value: "Estudios de Impacto Ambiental"
    }, {
        id: 505,
        value: "Certificaciones"
    }, {
        id: 506,
        value: "Margen Adicional"
    }]
};


var itemsModal = [{
    Codigo: 100,
    Elemento: "nombre100",
    Unidad: "aaaaa100",
    Cantidad: "x100",
    CostoUnitario: "x100",
    CostoTotal: "xx100"
}, {
    Codigo: 101,
    Elemento: "nombre101",
    Unidad: "aaaaa101",
    Cantidad: "x101",
    CostoUnitario: "x101",
    CostoTotal: "xx101"
}
, {
    Codigo: 102,
    Elemento: "nombre102",
    Unidad: "aaaaa102",
    Cantidad: "x102",
    CostoUnitario: "x102",
    CostoTotal: "xx102"
}
, {
    Codigo: 103,
    Elemento: "nombre103",
    Unidad: "aaaaa103",
    Cantidad: "x103",
    CostoUnitario: "x103",
    CostoTotal: "xx103"
}
, {
    Codigo: 104,
    Elemento: "nombre104",
    Unidad: "aaaaa104",
    Cantidad: "x104",
    CostoUnitario: "x104",
    CostoTotal: "xx104"
}];
//no usado
var itemsModal1 = [
    {
        ProductID: 1,
        ProductName: "Chai",
        SupplierID: 1,
        CategoryID: 1,
        QuantityPerUnit: "10 boxes x 20 bags",
        UnitPrice: 18.0000,
        UnitsInStock: 39,
        UnitsOnOrder: 0,
        ReorderLevel: 10,
        Discontinued: false,
        Category: {
            CategoryID: 1,
            CategoryName: "Beverages",
            Description: "Soft drinks, coffees, teas, beers, and ales"
        }
    }, {
        ProductID: 2,
        ProductName: "Chang",
        SupplierID: 1,
        CategoryID: 1,
        QuantityPerUnit: "24 - 12 oz bottles",
        UnitPrice: 19.0000,
        UnitsInStock: 17,
        UnitsOnOrder: 40,
        ReorderLevel: 25,
        Discontinued: false,
        Category: {
            CategoryID: 1,
            CategoryName: "Beverages",
            Description: "Soft drinks, coffees, teas, beers, and ales"
        }
    }, {
        ProductID: 3,
        ProductName: "Aniseed Syrup",
        SupplierID: 1,
        CategoryID: 2,
        QuantityPerUnit: "12 - 550 ml bottles",
        UnitPrice: 10.0000,
        UnitsInStock: 13,
        UnitsOnOrder: 70,
        ReorderLevel: 25,
        Discontinued: false,
        Category: {
            CategoryID: 2,
            CategoryName: "Condiments",
            Description: "Sweet and savory sauces, relishes, spreads, and seasonings"
        }
    }, {
        ProductID: 4,
        ProductName: "Chef Anton's Cajun Seasoning",
        SupplierID: 2,
        CategoryID: 2,
        QuantityPerUnit: "48 - 6 oz jars",
        UnitPrice: 22.0000,
        UnitsInStock: 53,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: false,
        Category: {
            CategoryID: 2,
            CategoryName: "Condiments",
            Description: "Sweet and savory sauces, relishes, spreads, and seasonings"
        }
    }, {
        ProductID: 5,
        ProductName: "Chef Anton's Gumbo Mix",
        SupplierID: 2,
        CategoryID: 2,
        QuantityPerUnit: "36 boxes",
        UnitPrice: 21.3500,
        UnitsInStock: 0,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: true,
        Category: {
            CategoryID: 2,
            CategoryName: "Condiments",
            Description: "Sweet and savory sauces, relishes, spreads, and seasonings"
        }
    }, {
        ProductID: 6,
        ProductName: "Grandma's Boysenberry Spread",
        SupplierID: 3,
        CategoryID: 2,
        QuantityPerUnit: "12 - 8 oz jars",
        UnitPrice: 25.0000,
        UnitsInStock: 120,
        UnitsOnOrder: 0,
        ReorderLevel: 25,
        Discontinued: false,
        Category: {
            CategoryID: 2,
            CategoryName: "Condiments",
            Description: "Sweet and savory sauces, relishes, spreads, and seasonings"
        }
    }, {
        ProductID: 7,
        ProductName: "Uncle Bob's Organic Dried Pears",
        SupplierID: 3,
        CategoryID: 7,
        QuantityPerUnit: "12 - 1 lb pkgs.",
        UnitPrice: 30.0000,
        UnitsInStock: 15,
        UnitsOnOrder: 0,
        ReorderLevel: 10,
        Discontinued: false,
        Category: {
            CategoryID: 7,
            CategoryName: "Produce",
            Description: "Dried fruit and bean curd"
        }
    }, {
        ProductID: 8,
        ProductName: "Northwoods Cranberry Sauce",
        SupplierID: 3,
        CategoryID: 2,
        QuantityPerUnit: "12 - 12 oz jars",
        UnitPrice: 40.0000,
        UnitsInStock: 6,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: false,
        Category: {
            CategoryID: 2,
            CategoryName: "Condiments",
            Description: "Sweet and savory sauces, relishes, spreads, and seasonings"
        }
    }, {
        ProductID: 9,
        ProductName: "Mishi Kobe Niku",
        SupplierID: 4,
        CategoryID: 6,
        QuantityPerUnit: "18 - 500 g pkgs.",
        UnitPrice: 97.0000,
        UnitsInStock: 29,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: true,
        Category: {
            CategoryID: 6,
            CategoryName: "Meat/Poultry",
            Description: "Prepared meats"
        }
    }, {
        ProductID: 10,
        ProductName: "Ikura",
        SupplierID: 4,
        CategoryID: 8,
        QuantityPerUnit: "12 - 200 ml jars",
        UnitPrice: 31.0000,
        UnitsInStock: 31,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: false,
        Category: {
            CategoryID: 8,
            CategoryName: "Seafood",
            Description: "Seaweed and fish"
        }
    }, {
        ProductID: 11,
        ProductName: "Queso Cabrales",
        SupplierID: 5,
        CategoryID: 4,
        QuantityPerUnit: "1 kg pkg.",
        UnitPrice: 21.0000,
        UnitsInStock: 22,
        UnitsOnOrder: 30,
        ReorderLevel: 30,
        Discontinued: false,
        Category: {
            CategoryID: 4,
            CategoryName: "Dairy Products",
            Description: "Cheeses"
        }
    }, {
        ProductID: 12,
        ProductName: "Queso Manchego La Pastora",
        SupplierID: 5,
        CategoryID: 4,
        QuantityPerUnit: "10 - 500 g pkgs.",
        UnitPrice: 38.0000,
        UnitsInStock: 86,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: false,
        Category: {
            CategoryID: 4,
            CategoryName: "Dairy Products",
            Description: "Cheeses"
        }
    }, {
        ProductID: 13,
        ProductName: "Konbu",
        SupplierID: 6,
        CategoryID: 8,
        QuantityPerUnit: "2 kg box",
        UnitPrice: 6.0000,
        UnitsInStock: 24,
        UnitsOnOrder: 0,
        ReorderLevel: 5,
        Discontinued: false,
        Category: {
            CategoryID: 8,
            CategoryName: "Seafood",
            Description: "Seaweed and fish"
        }
    }, {
        ProductID: 14,
        ProductName: "Tofu",
        SupplierID: 6,
        CategoryID: 7,
        QuantityPerUnit: "40 - 100 g pkgs.",
        UnitPrice: 23.2500,
        UnitsInStock: 35,
        UnitsOnOrder: 0,
        ReorderLevel: 0,
        Discontinued: false,
        Category: {
            CategoryID: 7,
            CategoryName: "Produce",
            Description: "Dried fruit and bean curd"
        }
    }];